The present invention relates to data storage in a non-relational database, and more specifically, to data storage in a non-relational database through a static data storage area and a dynamic data storage area belonging to a same table.
With the rapid development of artificial intelligence (AI) technology, big data analysis has become a common demand nowadays. Data analysis is an important enabling technology in almost all AI and cognitive computing solutions across various industries. Databases and high efficiency data storage is a key factor to improve and speed up data analytics and data access. Database tables are generally used in storing collected data. Data queries can then be raised to search out required data from the database tables.
With the rapid growth of amount of collected and stored data, there are significant amounts of data items with the same data values being repeatedly stored in databases which, unavoidably, takes up a large amount of data storage resources. For example, to implement analysis and prediction on air quality, data collected by deployed sensors around various monitoring points (e.g. 200 sensors around a given area) in a city need to be collected and stored every hour. Each data item reported by each sensor, every hour, may be stored in a row in a database table as raw data. For example, each data row may contain the following columns: province name, city name, station name, time, PM2.5 value and so on. The values of province name, city name, and station name are the same for many data rows and need to be repeatedly stored in a data table, which may cause significant redundancy of data storage.
A traditional way to solve this problem is to separate the data items into two tables. One table is used to store those data items with fixed values, for example, the city name, the station name, the province name, etc. Another table is used to store those data items with dynamic values, for example, the PM 2.5 value per hours. The two tables can be connected through unique IDs. In this way, the data with fixed values may be stored only once in the first table, so the data redundancy in a database system can be reduced.